#pragma once

#include "global.h"
#include "View.h"
#include "HomeViewResourceDefine.h"
#include "AppBlockComponent.h"
#include "BatteryComponent.h"
#include "RecordStatusComponent.h"
#include "WiFiStatusComponent.h"
#include "WiFiService.h"
#include "TimeComponent.h"

class HomeView : public View
{
private:
	BatteryComponent batteryComponent;
	RecordStatusComponent recordStatusComponent;
	WiFiStatusComponent wifiStatusComponent;
	TimeComponent timeComponent;
	std::map<Block, AppBlockComponent*> appBlockMap;

public:
    HomeView() {};
    virtual void init();
	virtual void show();
	void hide();
	void initShow();
    void setWiFiStatus(WiFiStatus wifiStatus);
    void setBatteryStatus(BatteryStatus batteryStatus);
	void setTime(const char * time);
	void loadBlocks(std::map<Block, AppName>&);
	void setBlockSelect(Block deselect, Block select);

    ~HomeView();
};

